namespace TSL.Utility.Json
{
    using System;
    using System.Security.Cryptography;
    using System.Text;

    public class MD5Helper
    {
        public static string GetHash(string data)
        {
            return GetHash(Encoding.Default.GetBytes(data));
        }

        public static string GetHash(byte[] data)
        {
            MD5 md = new MD5CryptoServiceProvider();
            return BitConverter.ToString(md.ComputeHash(data)).Replace("-", string.Empty);
        }
    }
}

